// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CountryService.java

package com.nervytech.tutorcruise.db.service.impl;

import com.nervytech.tutorcruise.db.dao.interfaces.ICountryDAO;
import com.nervytech.tutorcruise.db.service.interfaces.ICountryService;
import com.nervytech.tutorcruise.service.exception.TrainerCruiseServiceException;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("countryService")
public class CountryService implements ICountryService {

	@Autowired
	private ICountryDAO countryDao;

	public String getCountryName(int countryId) {
		return null;
	}

	public int getCountryId(String countryName) {
		return 0;
	}

	public Map<Integer, String> getCountryMap() throws TrainerCruiseServiceException {
		Map<Integer, String> countryMap = new HashMap<Integer, String>();
		try {
			countryMap = countryDao.getCountryMap();
		} catch (Exception e) {
			e.printStackTrace();
			throw new TrainerCruiseServiceException(e.getMessage());
		}
		return countryMap;
	}

}
